<script lang="ts" setup>
import { columns, formSchemas, searchSchemas } from './meta';

import { BasicCrud } from '@/components/crud';
import { addMenu, delMenu, listMenu, updateMenu } from '@/api/system/menu';

defineOptions({
  name: 'RolePage',
});
</script>

<template>
  <div>
    <BasicCrud
      tree-table
      tree-field="menuId"
      :pagination="false"
      :table-columns="columns"
      :form-schemas="formSchemas"
      :search-schemas="searchSchemas"
      :request="listMenu"
      :create-request="addMenu"
      :modify-request="updateMenu"
      :delete-request="delMenu"
      key-field="menuId"
    />
  </div>
</template>

<style lang="less" scoped></style>
